import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue';

Vue.use(VueRouter)

const routes = [{
  path: '/login',
  name: 'login',
  component: Login,
  meta: {
    isLogin: false
  }
},
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/Home.vue'),
    meta: {
      isLogin: true
    },
    children: [{
      path: '/home/xkxstudent',
      name: 'xkxstudent',
      component: () => import('../views/xkxStudent.vue')
    },
      {
        path: '/home/jjystudent',
        name: 'jjystudent',
        component: () => import('../views/jjyStudent.vue')
      },
      {
        path: '/home/djlstudent',
        name: 'djlstudent',
        component: () => import('../views/djlStudent.vue')
      },
      {
        path: '/home/ylstudent',
        name: 'ylstudent',
        component: () => import('../views/ylStudent.vue')
      },
      {
        path: '/home/wtstudent',
        name: 'wtstudent',
        component: () => import('../views/wtStudent.vue')
      },
      {
        path: '/home/zxstudent',
        name: 'zxstudent',
        component: () => import('../views/zxStudent.vue')
      },
      {
        path: '/home/zhlstudent',
        name: 'zhlstudent',
        component: () => import('../views/zhlStudent.vue')
      },

      {
        path: '/home/xkxclass',
        name: 'xkxclass',
        component: () => import('../views/xkxClass.vue')
      },
      {
        path: '/home/jjyclass',
        name: 'jjyclass',
        component: () => import('../views/jjyClass.vue')
      },
      {
        path: '/home/djlclass',
        name: 'djlclass',
        component: () => import('../views/djlClass')
      },
      {
        path: '/home/ylclass',
        name: 'ylclass',
        component: () => import('../views/ylClass')
      },
      {
        path: '/home/wtclass',
        name: 'wtclass',
        component: () => import('../views/wtClass')
      },
      {
        path: '/home/zxclass',
        name: 'zxclass',
        component: () => import('../views/zxClass')
      },
      {
        path: '/home/zhlclass',
        name: 'zhlclass',
        component: () => import('../views/zhlClass')
      },

    ]

  }, {
    path: '/',
    redirect: '/login'
  }
]

const router = new VueRouter({
  routes
})

export default router